#ifndef AST_DECLARATION_H
#define AST_DECLARATION_H

#include "../ASTNode.h"

class DeclarationSpecifiers;
class InitDeclaratorList;

/*
declaration:
		declaration-specifiers    init-declarator-list(opt)    ;
*/
class Declaration : public ASTNode
{
protected:
	Declaration(void)
		:ASTNode(ASTNode::declaration){};
public:
	Declaration(DeclarationSpecifiers * pSpec)
		: ASTNode(ASTNode::declaration)
		, m_pSpecs(pSpec)
		, m_pDeclaratorList(NULL){};
	Declaration(DeclarationSpecifiers * pSpec, InitDeclaratorList *pDeclaratorList)
		: ASTNode(ASTNode::declaration)
		, m_pSpecs(pSpec)
		, m_pDeclaratorList(pDeclaratorList){};


	virtual ~Declaration();
	
	
	virtual void					codeGen();

protected:
	DeclarationSpecifiers *					m_pSpecs;
	InitDeclaratorList *					m_pDeclaratorList;
};

#endif
